Some books introduce and explain the service components of Android, using the term backend services, and are relative to the activity running on the main thread. Because the word backstage is easily misunderstood, the service has been running in the background? What thread is running? Service has always been a thread running? and backstage in different contexts have different understanding. But if you've developed a
.46. When you want to catch an exception with a code snippet, select the fragment in the editor and press Ctrl-alt-t (code | Surround with ... Then select "Try/catch". It automatically generates a snap block of all exceptions thrown in the code fragment. In Options | File Templates | You can also customize the template that generates the capture block yourself in Code tab.Other items in the list can be surrounded by other structures.47, when using the code to complete, use the Tab key to enter t
1. The activation process of the child activity component within the processIn the startup process of the Android activity component http://blog.csdn.net/jltxgcy/article/details/35984557, we have analyzed the activation process of the activity in detail, We only analyze the differences between the child activity compon
dex on the C layer, you can call the main Java method to execute Java code. However, if you want to access system services, no Context is acceptable. Therefore, ActivityThread is called through reflection, get the Application.My initial thought was to inject inj_dalvik into the system_server process, and then access all Android system services in it. But then I found two problems, dex cannot use a remote s
between processes in android:
Activity, content provider, binder, service
In fact, the android process communication is based on linux. Although the names are slightly different, the underlying implementation is implemented in the above four methods.
1. Activity implements value transfer between two apps
Suppose there are two apps, APP1 and APP2, and you want to
Original article: Android calls the JNI process to facilitate subsequent operations. I personally recorded the entire process of calling JNI, and I forgot to save it. Ah.
In some cases, the ndk environment and ndk source code must be prepared. cygwin must be installed with a profile. Java requires environment variables.
1. Create a new project and create a cl
Android local upgrade principle and process (I. Upper Layer), android process1. First, let's take a look at the steps to go to system update; settings --> about mobile phones --> system updates① On the settings page, go to the settings page for system updates. The DeviceInfoSettings. java class under the settings module. The preference is Device_info_settings.xml
Use of Android process-to-process communication AIDL:
1. Introduction
In Android, threads cannot transmit information to each other and share their memory space. Therefore, Android provides AIDL.
AIDL (Android Interface Definition
The Android system is actually an application in a Linux system. The corresponding program is app_process, and the program is declared in Init.rc. Linux starts the zygote (app_process) session, which is implemented by Java code and executed by the Dalvik virtual machine, and the corresponding code is latest-android-2.3.7_r1\android-2.3.7_r1\ In Frameworks\base\co
invalidate () operation is as follows:1. setvisibility () method:The requestlayout () and invalidate methods are called indirectly when the visual status of a view is changed from invisible to gone. At the same time, because the size of the entire view tree has changed, the measure () process and the draw () process will be requested. Similarly, only the view that needs to be "re-drawn" will be drawn.Descr
external requests} closeServerSocket ();} catch (MethodAndArgsCaller caller) {caller. run ();} catch (RuntimeException ex) {Log. e (TAG, "Zygote died with exception", ex); closeServerSocket (); throw ex ;}}
The main function of com. android. internal. OS. ZygoteInit mainly performs the following four tasks:
Call registerZygoteSocket () to create a socket for listening to the fork requests sent by ams;
C
} closeServerSocket ();} catch (MethodAndArgsCaller caller) {caller. run ();} catch (RuntimeException ex) {Log. e (TAG, "Zygote died with exception", ex); closeServerSocket (); throw ex ;}}The main function of com. android. internal. OS. ZygoteInit mainly performs the following four tasks:
Call registerZygoteSocket () to create a socket for listening to the fork requests sent by ams;
Call preload (
Four main components of Android Application series-use ContentProvider for cross-process communication and four major components of android
I. Problem Description
In Android, how does one implement communication between different applications (called across processes )?
Process Analysis of loading Android view to window, android View
In the previous blog, the Handler principle in Android talked about Handler and talked about how android Activity started to execute the onCreate method. This article mainly starts from the setContentView metho
For Android Developers, ANR (Application Not Responding) is a common problem. Generally, if an ANR occurs, the system generates a trace file in the/data/anr/directory. By analyzing the trace file, you can locate the cause of the ANR. There are many reasons for the generation of ANR, such as CPU usage is too high, events are not responded to in a timely manner, deadlocks, etc. Next we will solve the ANR problem caused by deadlocks, to describe how to a
The preceding result obtained from peers. get (index) is a ZygoteConnection object, indicating a Socket connection.
Therefore, the next step is to call the ZygoteConnection. runOnce function for further processing.
Step 6. ZygoteConnection. runOnce
This function is defined in the frameworks/base/core/java/com/android/internal/OS/ZygoteConnection. java file:
[java]viewplaincopyclassZygoteConnection{
.
Android study note 26. Cross-process call Service (AIDL Service) and androidaidlCross-process call Service (AIDL Service) I. AIDL Service1. What is AIDL Service?AIDL, that is, Android Interface Definition Language. android is used to define remote interfaces. the syntax of t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.